import BaseAssetLoad from "./BaseAssetLoad";
import MsgDispatcher, { MsgType } from "../../Tool/MsgDispatcher";
import { EventTool } from "../../Tool/EventTool";
import MathTool from "../../Tool/MathTool";
import AdMan from "../../Ad/FaceBookAd";


export default class FBAssetLoader extends BaseAssetLoad 
{

    public OnLoadFinished() 
    {
        FBInstant.startGameAsync().then(function () {
            //加载场景                 
            console.log("--------fb--------");
            var playerId = FBInstant.player.getID();
            var playerName = FBInstant.player.getName();
            console.log("fbId=" + playerId);
            console.log("--------fb--------");
            AdMan.LoadGameAssistant();
        });
    }

    public OnLoadPregress(percent: number) 
    {
        FBInstant.setLoadingProgress(percent);
    }

    public LoadAsset(succss?:Function,fail?:Function,complete?:Function) 
    {
        succss&&succss();
    }

}